<include file="public@head_top"/>
<link type="text/css" href="__TMPL__/public/assets/css/pike.css" rel="stylesheet" />
<link type="text/css" href="__TMPL__/public/assets/css/shop.css" rel="stylesheet" />
<link type="text/css" href="__TMPL__/public/assets/frontend/css/product_detail.css" rel="stylesheet" />
</head>
<body class="bgeee">
<include file="public@head"/>
<include file="public@sidebar_head"/>

<div class="showDetailW">
    <div class="showDetailMain clearfloat">
        
        <div class="showWap">
        	<div class="showPc">
        		<!--页面必要代码,img标签上请务必带上图片真实尺寸px-->
                <div id="showbox">
                    <img src="{:cmf_get_image_url($article.img_big)}" width="400" height="400" />
                  <notempty name="article['more']['photos']">
                        <foreach name="article['more']['photos']" item="vo">
                              <img src="/upload/{$vo.url}" alt="{$vo.name}" width="400" height="400" />
                        </foreach>
                    </notempty>
                </div><!--展示图片盒子-->
                <div id="showsum"></div><!--展示图片里边-->
                <p class="showpage">
                  <a href="javascript:void(0);" id="showlast"> < </a>
                  <a href="javascript:void(0);" id="shownext"> > </a>
                </p>
            </div>
            <div class="showMobile">
            	<div class="pi">
                    <!-- 轮播 -->
                    <ul class="pike">
                        <li>
                            <img src="{:cmf_get_image_url($article.img_big)}" class="pike_img">
                        </li>
                        <notempty name="article['more']['photos']">
                            <foreach name="article['more']['photos']" item="vo">
                                  <li><img src="/upload/{$vo.url}" alt="{$vo.name}" class="pike_img" /></li>
                            </foreach>
                        </notempty>
                    </ul>
                    <!-- 轮播左箭头(如果不需要删除即可) -->
                    <div class="pike_prev"></div>
                    <!-- 轮播右箭头(如果不需要删除即可) -->
                    <div class="pike_next"></div>
                    <!-- 轮播圆点(如果不需要删除即可) -->
                    <div class="pike_spot"></div>
                </div>
            </div>
            {$configinfo['shopactivity']}
            <div class="cartBlock st-mt15">{$configinfo.shopcarthtml}</div>
        </div>
        <div class="showDetailMainCont">
            <h2>
            	<if condition="$article[$integralstatus_name] == 1">
                <label class="hdstyle" style="background:#ff8000;">积分兑换</label>
                <elseif condition="$article[$promotestatus_name] == 1 && $article['original_'.$promotetime_name] egt time()">
                <label class="hdstyle">促销活动</label>
                </if>
                {$article.post_title}
            </h2>
            <dl class="listpara">
              <dt>市场价：</dt><dd><del class="st-fon18 status-text-gray">￥{$article.marketprice}</del></dd>
            </dl>
            <if condition="$article[$integralstatus_name] == 1">
            <dl class="listpara">
              <dt>兑换价：</dt>
              <dd>
                  <font class="st-colh st-fon25 st-fonb"><span id="integralprice">{$integralprice}</span>积分</font>
                  +
                  <font class="st-colh st-fon25 st-fonb">￥<span id="goodsprice">{$exchangeprice}</span></font>
                  <del class="status-text-gray">本店价：￥{$article.price}</del>
              </dd>
            </dl>
            <elseif condition="$article[$promotestatus_name] == 1 && $article['original_'.$promotetime_name] egt time()">
            <dl class="listpara">
              <dt>促销价：</dt><dd><font class="st-colh st-fon25 st-fonb">￥<span id="goodsprice">{$discountprice}</span></font>
              <del class="status-text-gray">本店价：￥{$article.price}</del>
              </dd>
              <div class="promotedesc">
              	  <div class="promotetitle">{$article.promotetitle}</div>
                  <div class="promotetime">
                    <span id="t_d">{$promotesytime.day} 天</span>
                    <span id="t_h">{$promotesytime.hour} 时</span>
                    <span id="t_m">{$promotesytime.min} 分</span>
                    <span id="t_s">{$promotesytime.sec} 秒</span>
                    
                    <script type="text/javascript">
                    function getRTime() {
                        var EndTime = new Date("{$article[$promotetime_name]}"); //截止时间
                        var NowTime = new Date();
                        var t = EndTime.getTime() - NowTime.getTime();
                        var d = Math.floor(t / 1000 / 60 / 60 / 24);
                        var h = Math.floor(t / 1000 / 60 / 60 % 24);
                        var m = Math.floor(t / 1000 / 60 % 60);
                        var s = Math.floor(t / 1000 % 60);
                    
                        document.getElementById("t_d").innerHTML = d + " 天";
                        document.getElementById("t_h").innerHTML = h + " 时";
                        document.getElementById("t_m").innerHTML = m + " 分";
                        document.getElementById("t_s").innerHTML = s + " 秒";
                    }
                    setInterval(getRTime, 1000);
                    </script>
                    </div>
                </div>
            </dl>
            <else>
            <dl class="listpara">
            <dt>本店价：</dt><dd><font class="st-colh st-fon25 st-fonb">￥<span id="goodsprice">{$article.price}</span></font></dd>
              <php>$memberprice = getmemberrankprice($article['price']);</php>
              <if condition="$configmember.rank_id gt 0">
              <span class="membertip">您当前为 <span>{$configmember.rankinfo.name}</span> 可享受 <font color="red">¥{$memberprice}</font> 的价格</span>
              </if>
            </dl>
            </if>
            <if condition="$article[$integraldkstatus_name] == 1 && $article[$integralstatus_name] != 1">
            <dl class="listpara">
              <dd class="status-text-yellow">使用积分可抵扣金额：￥{$integraldkprice}</dd>
            </dl>
            </if>
            <if condition="$article.recparainfohtml">
                {$article.recparainfohtml}
            <else>
             	<p class="desc">{$article.post_excerpt}</p>
            </if>
            <div class="shoporder st-mt15">{$configinfo.shopparameterhtml}</div>
            <div class="st-block" style="margin-bottom:15px; margin-top:15px; height:35px; line-height:35px;">
                {$site_info.sharehtml|stzhtml}
            </div>
            <div class="showDetailMainB clearfloat">
                <a class="showDetailLqyp" href="{$configsystem['messageurl']}" target="_blank"><span></span>{$configlang['Online_message']}</a>
                <a class="showDetailZxzx" href="{$configsystem['contacturl']}" target="_blank"><span></span>{$configlang['advisory']}</a>
            </div>
            <div class="st-lin18 st-mt15">
            	<if condition="$prev_article.post_title">
                <a title="{$prev_article['post_title']}" href="{:cmf_url('portal/Article/index',array('id'=>$prev_article.id,'cid'=>$prev_article['category_id']))}">
                    <span>{$configlang['PreviousPiece']}{$configlang['mh']}</span>
                    {$prev_article['post_title']}
                </a>
                <else/>
                <a><span>{$configlang['PreviousPiece']}{$configlang['mh']}</span> {$configlang['No_more']}</a>
                </if>
            </div>
            <div class="st-lin18">
                <if condition="$next_article.post_title">
                <a title="{$next_article['post_title']}" href="{:cmf_url('portal/Article/index',array('id'=>$next_article.id,'cid'=>$next_article['category_id']))}">
                    <span>{$configlang['NextPiece']}{$configlang['mh']}</span>
                    {$next_article['post_title']}
                </a>
                <else/>
                <a><span>{$configlang['NextPiece']}{$configlang['mh']}</span> {$configlang['No_more']}</a>
                </if>
            </div>
        </div>
    </div>
    
    <div class="showDetailInner">
        <h2><span>{$configlang['product_details']}</span></h2>
        <div class="showDetailInnerW st-fon16">
            <if condition="$article.defparainfohtml">
                  {$article.defparainfohtml}
              </if>
            <notempty name="contenthtml">
                {$contenthtml}
            <else/>
                <div class="st-x-showpc">{$article.post_content|default=''}</div>
                <div class="st-x-showmobile">
                  <notempty name="article.contentmobile">{$article.contentmobile|stzhtml}<else/>{$article.post_content|default=''}</notempty>
                </div>
            </notempty>
            
            <style>@media (max-width:991px){
			.relrecBlock ul li:nth-last-child(1){ display:none;}
		}
		</style>        
         <div class="relrecBlock st-listBlock st-flashBlock st-listBlockFPX5">
             <ul class="st-flexBox st-xd-blockFPX5">
             <php>
              $where = [
                'recommended' => 1
              ];
              </php>
              <portal:articles limit="10" order="post.post_hits DESC" where="$where" categoryIds="$category.id">
                <li class="st-wid20 st-xd-box33 st-padlr5 st-mb15">
				<div class="st-posr">
					<a class="st-boxmax st-disb st-imgBox st-imgBox100" href="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$vo['category_id']))}" title="{$vo.post_title}">
                    <empty name="vo.img_thumb">
                        <img class="st-box" src="__TMPL__/public/assets/images/default-thumbnail.png"
                             alt="{$vo.post_title}">
                        <else/>
                        <img class="st-box" src="{:cmf_get_image_url($vo.img_thumb)}"
                             alt="{$vo.post_title}">
                    </empty>
					</a>
					<div class="st-posa st-bottom0 st-wid100" style=" background-color: rgba(0,0,0,.5);">
					  <h3 class="st-titItem32 st-xd-titItem28 st-texc"><a href="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$vo['category_id']))}" title="{$vo.post_title}" class="st-colf">{$vo.post_title}</a></h3>
					</div>
				</div>
                </li>
                </portal:articles>
             </ul>
           </div>
           <div class="st-blank15"></div>

               <php>
                    $after_content_hook_param=[
                    'object_id'=>$article['id'],
                    'table_name'=>'portal_post',
                    'object_title'=>$article['post_title'],
                    'user_id'=>$article['user_id'],
                    'url'=>cmf_url_encode('portal/Article/index',array('id'=>$article['id'],'cid'=>$category['id'])),
                    'object'=>$article
                    ];
                </php>
                <hook name="after_content" param="after_content_hook_param"/>
                
                <notempty name="taglist">
                <p class="st-mt30 st-xd-mt15">
                    {$configlang['label']}:&nbsp&nbsp
                    <foreach name="taglist" item="vo">
                     <a href="{:cmf_url('portal/Tag/index',array('id'=>$configinfo.moduleid,'tid'=>$vo.tag_id))}" title="{$vo.name}">{$vo.name}</a> | 
                    </foreach>
                 </p>
                 </notempty>
        </div>
    </div>
    
    <div class="homeDzzxB">
        <div class="homeDzzxBH showDetailBH clearfloat">
            <div class="line"></div>
            <div class="homeDzzxBHCont showDetailH">
                <h3><span>{$configlang['related_products']}</span></h3>
            </div>
            <div class="block"></div>
        </div>
        <div class="homeDzzxBW showDetailBW">
            <ul class="sliderHomeDzzc sliderShowDetail clearfloat">
            	<portal:articles limit="10" order="post.post_hits DESC" categoryIds="$category.id">
                <li><a href="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$vo['category_id']))}" title="{$vo.post_title}">
                    <div class="pic">
                    <empty name="vo.img_thumb">
                        <img src="__TMPL__/public/assets/images/default-thumbnail.png"
                             alt="{$vo.post_title}">
                        <else/>
                        <img src="{:cmf_get_image_url($vo.img_thumb)}"
                             alt="{$vo.post_title}">
                    </empty>
                    </div>
                    <p class="single-line">{$vo.post_title}</p>
                </a></li>
                </portal:articles>
            </ul>
        </div>
    </div>
    
    
</div>

<include file="public@sidebar_foot"/> 
<include file="public@footer"/>
<script type="text/javascript" src="__TMPL__/public/assets/frontend/js/product_detail.js"></script> 
<script type="text/javascript" src="__TMPL__/public/assets/js/jquery.zoom.js"></script>
<script type="text/javascript">
	
	$('.sliderShowDetail').bxSlider({
		'auto':true,
	'controls':true,
	'touchEnabled':true,
	'pager':false,
	'speed':600,
		'slideWidth': '282',
	'minSlides': 2,
	'maxSlides': 3,
	'moveSlides': 1,
	})
	
	
</script>
<script src="__TMPL__/public/assets/js/pike.min.js"></script>
<script>
   var myPi = new Pike(".pi", {
		type: 1, // 轮播的类型(1渐隐)
		automatic: true, //是否自动轮播 (默认false)
		autoplay: 2000, //自动轮播毫秒 (默认3000)
		hover: true, //鼠标悬停轮播 (默认false)
		arrowColor: "#ccc", //箭头颜色 (默认绿色)
		arrowBackgroundType: 1, //箭头背景类型 (1: 方形, 2:圆形)
		arrowBackground: 2, //箭头背景色 (1:白色,2:黑色, 默认:无颜色)
		arrowTransparent: 0.2, //箭头背景透明度 (默认: 0.5)
		spotColor: "white",//圆点颜色 (默认: 白色)
		spotType: 1, //圆点的形状 (默认: 圆形, 1:圆形, 2.矩形)
		spotSelectColor: "red", //圆点选中颜色 (默认绿色)
		spotTransparent: 0.8, //圆点透明度 (默认0.8)
		mousewheel: false, //是否开启鼠标滚动轮播(默认false)
		drag: false, //是否开启鼠标拖动 (默认为: true, 如不需要拖动设置false即可)
		loop: true, //是否循环轮播 (默认为: false)
   });
   $(".pike").height($(".pike img").height() - 17);// 减去滚动条宽度
   $(window).resize(function(){
   		$(".pike").height($(".pike img").height() - 17);// 减去滚动条宽度
   });
</script>
</body>    
</html>